package com.xdhl.fu.member.api.factory;

import com.xdhl.fu.member.api.RemoteMemberBasicService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 会员服务降级处理
 *
 * @author Flight Ultimate
 */
@Component
public class RemoteMemberBasicFallbackFactory implements FallbackFactory<RemoteMemberBasicService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteMemberBasicFallbackFactory.class);

    @Override
    public RemoteMemberBasicService create(Throwable throwable) {
        log.error("会员服务调用失败:{}", throwable.getMessage());
        return null;
    }

}
